package com.ndood.recruit.dao;

import com.ndood.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 数据访问接口
 * @author Administrator
 *
 */
public interface RecruitDao extends JpaRepository<Recruit,String>,JpaSpecificationExecutor<Recruit>{

	/**
	 * 1.2.15 查询推荐职位列表（按创建日期降序排序）
	 */
	public List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);

	/**
	 *  1.2.19 查询最新职位列表
	 */
	public List<Recruit> findTop12ByStateNotOrderByCreatetimeDesc(String state);

}
